package com.bestcem.xm.member.grpc.service.param.openplatform;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * 批量创建/更新联系人grpc接口参数
 * @author dc.wang <dc.wang@idiaoyan.com>
 * @version V1.0
 * @date 2021/11/8 16:08
 */
@Getter
@Setter
@ToString
public class BatchUpsertMembersParam {
    /**
     * 企业标识
     */
    @NotNull(message = "组织id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "组织id格式错误")
    private String orgId;

    /**
     * 用户标识
     */
    private String userId;

    /**
     * 联系人信息
     */
    @NotEmpty(message = "联系人集合不能为空")
    private List<UpsertMemberParam> upsertMemberParams;

}
